<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>芯佑电商</title>
    <#include "/website/commonWebsite.html">
    <!--==网站图标==-->
    <!--<link rel="shortcut icon" type="image/x-icon" href="/website/images/Favorites.ico" media="screen">-->
    <!--==引入jQuery==-->
    <!--<script src="js/jquery-3.0.0.js"></script>-->
    <!--==样式文件==-->
    <!--<link href="css/share.css" rel="stylesheet" type="text/css">
    <link href="css/home.css" rel="stylesheet" type="text/css">
    <link href="css/shopping.css" rel="stylesheet" type="text/css">
    <link href="css/me.css" rel="stylesheet" type="text/css">
    <link href="css/login.css" rel="stylesheet" type="text/css">-->
    <!--==轮播海报==-->
    <!--<script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/superslide.2.1.js"></script>-->

</head>
<body>
<#include "/website/header.html">
<!--&lt;!&ndash;==  头部  ==&ndash;&gt;
<div class="header">
    <script type="text/javascript">
        function load_home() {
            document.getElementById("viewDiv").innerHTML = '';
        }
    </script>
    <object type="text/html" data="/website/header" width="100%" height="210px" style="margin-bottom: -5px;"></object>
</div>-->

<!--==  内容区域  ==-->
<div class="home_n">
    <div  class="home_nr">
        <!--== 菜单和海报 ==-->
        <div class="home_menu">
            <!--== 左侧菜单 ==-->
            <div class="home_menu_le">
                <div class="home-menu-le-bt"><img src="/website/images/home_04.png">类别分类</div>
                <div class="mod-menu">
                    <!--一级菜单列表-->
                    <ul class="menu-item">
                        <#if productTypeList?? && productTypeList?size &gt;0>
                            <#list productTypeList as item>
                                <li><a href="/website/productList?productTypeFirst=${item.pk}&page=1&limit=28"><img src="/website/images/home_05.png">${item.product_type_name}</a></li>
                                <input type="hidden" value="${item.pk}">
                            </#list>
                        </#if>
                    </ul>
                    <!--浮动内容-->
                    <div class="menu-cont" style="display:none;top:241px;">
                        <div class="menu-cont-list">
                            <dl>
                            </dl>
                        </div>
                    </div>
                </div>
            </div>
            <!--== 右侧banner ==-->
            <div class="home_menu_ri">
                <!--==banner==-->
                <div class="fullSlide">
                    <div class="bd">
                        <ul>
                            <#if bannerList?? && bannerList?size &gt;0>
                                <#list bannerList as item>
                                    <li _src="url(//${item.bar_image})" style="background:#ccc center 0 no-repeat;"><a href="#"></a></li>
                                </#list>
                            </#if>
                        </ul>
                    </div>
                    <div class="hd"><ul></ul></div>
                    <span class="prev"></span>
                    <span class="next"></span>
                </div><!--fullSlide end-->
            </div>
        </div>
        <!--==精品商品==-->
        <div class="home_list">
            <!--标题-->
            <div class="home_list_bt">
                <h1>精品商品</h1>
                <p><a href="/website/productList?no3=1&page=1&limit=28">查看全部</a></p>
            </div>
            <!--内容-->
            <div class="home_list_n">
                <#if boutiqueProductList?? && boutiqueProductList?size &gt;0>
                    <#list boutiqueProductList as item>
                        <div class="home_list_nr">
                            <#assign imgPaths=item.product_avatar?split(";")>
                            <h1><a href="/website/productDetails?productPk=${item.pk}"><img src="//${imgPaths[0]}" width="275" height="275"></a></h1>
                            <#if item.is_new==1>
                                <h2><img src="/website/images/home_11.png"></h2>
                            <#elseif item.is_new==2>
                                <h2><img src="/website/images/home_12.png"></h2>
                            </#if>
                            <dl>
                                <dt><a href="/website/productDetails?productPk=${item.pk}">${item.product_name} ${item.product_title}</a></dt>
                                <#if item.product_sale??&&item.product_sale!="">
                                    <dd>${item.product_sale}<del>${item.product_price}</del></dd>
                                <#else>
                                    <dd>${item.product_price}</dd>
                                </#if>
                            </dl>
                        </div>
                    </#list>
                </#if>
            </div>
        </div>
        <!--==超值推荐==-->
        <div class="home_list">
            <!--标题-->
            <div class="home_list_bt">
                <h1>超值推荐</h1>
                <p><a href="/website/productList?no3=2&page=1&limit=28">查看全部</a></p>
            </div>
            <!--内容-->
            <div class="home_list_n">
                <#if greatValueProductList?? && greatValueProductList?size &gt;0>
                    <#list greatValueProductList as item>
                        <div class="home_list_nr">
                            <#assign imgPaths=item.product_avatar?split(";")>
                            <h1><a href="/website/productDetails?productPk=${item.pk}"><img src="//${imgPaths[0]}" width="275" height="275"></a></h1>
                            <#if item.is_new==1>
                                <h2><img src="/website/images/home_11.png"></h2>
                            <#elseif item.is_new==2>
                                <h2><img src="/website/images/home_12.png"></h2>
                            </#if>
                            <dl>
                                <dt><a href="/website/productDetails?productPk=${item.pk}">${item.product_name} ${item.product_title}</a></dt>
                                <#if item.product_sale??&&item.product_sale!="">
                                    <dd>${item.product_sale}<del>${item.product_price}</del></dd>
                                <#else>
                                    <dd>${item.product_price}</dd>
                                </#if>
                            </dl>
                        </div>
                    </#list>
                </#if>
            </div>
        </div>
        <!--==热卖商品==-->
        <div class="home_list">
            <!--标题-->
            <div class="home_list_bt">
                <h1>热卖商品</h1>
                <p><a href="/website/productList?no3=3&page=1&limit=28">查看全部</a></p>
            </div>
            <!--内容-->
            <div class="home_list_n">
                <#if saleHotProductList?? && saleHotProductList?size &gt;0>
                    <#list saleHotProductList as item>
                    <div class="home_list_nr">
                        <#assign imgPaths=item.product_avatar?split(";")>
                        <h1><a href="/website/productDetails?productPk=${item.pk}"><img src="//${imgPaths[0]}" width="275" height="275"></a></h1>
                        <#if item.is_new==1>
                            <h2><img src="/website/images/home_11.png"></h2>
                        <#elseif item.is_new==2>
                            <h2><img src="/website/images/home_12.png"></h2>
                        </#if>
                        <dl>
                            <dt><a href="/website/productDetails?productPk=${item.pk}">${item.product_name} ${item.product_title}</a></dt>
                            <#if item.product_sale??&&item.product_sale!="">
                                <dd>${item.product_sale}<del>${item.product_price}</del></dd>
                            <#else>
                                <dd>${item.product_price}</dd>
                            </#if>
                        </dl>
                    </div>
                    </#list>
                </#if>
            </div>
        </div>
        <!--==新品上架==-->
        <div class="home_list">
            <!--标题-->
            <div class="home_list_bt">
                <h1>新品上架</h1>
                <p><a href="/website/productList?no3=4&page=1&limit=28">查看全部</a></p>
            </div>
            <!--内容-->
            <div class="home_list_n">
                <#if newProductList?? && newProductList?size &gt;0>
                    <#list newProductList as item>
                        <div class="home_list_nr">
                            <#assign imgPaths=item.product_avatar?split(";")>
                            <h1><a href="/website/productDetails?productPk=${item.pk}"><img src="//${imgPaths[0]}" width="275" height="275"></a></h1>
                            <#if item.is_new==1>
                                <h2><img src="/website/images/home_11.png"></h2>
                            <#elseif item.is_new==2>
                                <h2><img src="/website/images/home_12.png"></h2>
                            </#if>
                            <dl>
                                <dt><a href="/website/productDetails?productPk=${item.pk}">${item.product_name} ${item.product_title}</a></dt>
                                <#if item.product_sale??&&item.product_sale!="">
                                    <dd>${item.product_sale}<del>${item.product_price}</del></dd>
                                <#else>
                                    <dd>${item.product_price}</dd>
                                </#if>
                            </dl>
                        </div>
                    </#list>
                </#if>
            </div>
        </div>
    </div>
</div>

<!--==  版权  ==-->
<script type="text/javascript">
    function load_home() {
        document.getElementById("viewDiv").innerHTML = '';
    }
</script>
<object type="text/html" data="/website/copyright" width="100%" height="370px" style="margin-bottom: -5px;"></object>

<!--==  返回头部  ==-->
<script type="text/javascript" src="/website/js/backtop.js"></script>

<!--==  轮播  ==-->
<script type="text/javascript">
    $(".fullSlide").hover(function(){
            $(this).find(".prev,.next").stop(true, true).fadeTo("show", 0.5)
        },
        function(){
            $(this).find(".prev,.next").fadeOut()
        });
    $(".fullSlide").slide({
        titCell: ".hd ul",
        mainCell: ".bd ul",
        effect: "fold",
        autoPlay: true,
        autoPage: true,
        trigger: "click",
        startFun: function(i) {
            var curLi = jQuery(".fullSlide .bd li").eq(i);
            if ( !! curLi.attr("_src")) {
                curLi.css("background-image", curLi.attr("_src")).removeAttr("_src")
            }
        }
    });
</script>

<!--==左侧菜单==-->
<script type="text/javascript">
    $(document).ready(function(){
        var mod_menu=$(".mod-menu");//导航模块区
        var menu=function(){
            var menuItem=$(".menu-item li");//选择导航列表
            menuItem.each(function(){
                var _index=$(this).index();//获取当前选择菜单列表的索引
                var productTypeParentPk= $(this).siblings().val();//父分类pk
                var FistProductTypeName= $(this).find("a").text();
                $(this).mouseenter(function(){
                    var y = $(this).position().top-1;//获取当前鼠标滑过的列表的顶部坐标
                    $.ajax({
                        url:'/website/secondProductType',
                        data:{'productTypeParent':productTypeParentPk},
                        type:'get',
                        dataType:'json',
                        success:function(resp){
                            var html="<dt>"+FistProductTypeName+"</dt>"
                            for (var i = 0; i <resp.data.length ; i++) {
                                html+="<dd><a href=\"/website/productList?productTypeSecond="+resp.data[i].pk+"&page=1&limit=28\">"+resp.data[i].product_type_name+"</a></dd>"
                            }
                            $(".menu-cont-list dl").html(html);
                        },
                        error:function(){
                            layer.msg("未知错误");
                        }

                    })
                    $(".menu-cont").show();
                    $(".menu-cont").css("top",y);//需要显示的对应索引内容
                    $(this).addClass("mouse-bg").siblings().removeClass("mouse-bg");
                    $(".menu-cont>div").eq(_index).show().siblings().hide();
                });
            });/*导航菜单菜单*/
            $(".mod-menu").mouseleave(function(){
                $(".menu-cont").hide();
                menuItem.removeClass("mouse-bg");
            })
        }//展开二级菜单
        menu();//执行展开二级菜单函
    });
</script>

</body>
</html>